Repository navigation
mcpx prompt: caller-supplied model/provider on the intent path + remove the MCP sampling fallback from generate() (#1961) - #2004
Conversation
… the sampling fallback from generate() (#1961)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Implements the #1961 remainder (queue task 2904, per triage task 2861): the one failing acceptance item of "natural language to script".
Caller-supplied model/provider on the intent path
/v1/intentacceptsproviderandmodelfields;mcpx promptgains--providerand--modelflags (theexec --promptsurface passes through the same shared path).repair.*provider config (callerProviderConfig/resolveProviderFor): a caller value wins, an empty one leaves the daemon's setting. The Resolution'sModelnow states what actually generated:provider:<name>/<model>.prompt.samplesetting (defaultnever) — a found CLI on the host is still not, by itself, permission.Sampling fallback removed from generate()
generate()ininternal/daemon/consumer.gono longer opens an MCP sampling request when no provider answers (sampling is deprecated in MCP 2026-07-28 and the primary consumer cannot answer it). No provider (or a failing one) returnserrNoModel, and the intent route answers with the existing no-model resolution (Model: "none"+ ranked recipes).elicit.SampleAskitself is untouched — sampling as a relay channel for upstream servers (mcpx: design — sampling trust boundary (reviewable, validated, honestly error-coded) #1834/mcpx: Phase 3 of #1834 — reviewable sampling in mcpx elicit + matrix/register truth-up + nix#256 evidence #1837) is a different subject.Tests (laptop, CI to confirm): new
internal/daemon/generate_test.go(config layering; no-provider → errNoModel with no broker present; provider answers → source +provider:mock-ai/mock-model; provider failure → errNoModel) andinternal/cli/intent_test.go(Intent threads provider/model into the /v1 body, omits them when unset). Fullinternal/daemonandinternal/clisuites pass on the laptop.Refs #1961. Does not build the #1925 provider layer — if that lands, the parameter routes through it.
Need help on this PR? Tag
@codesmith-botwith what you need.